#!/usr/bin/perl
$\="\n";
$ex = "info";
while(<>){
    if ( ($f) = /package\s+(.+)/){ 
	$f=~s/\:+/-/g; $f=~s/\;//; $cf=$f 
    }
    if ( ($s)=/sub\s+(.+)/ or ($s)=/accessors.+?qw\((.+?)\)/ ){ 
	$s=~s/\{//; `echo "$s" >> "$cf.$ex"`
    }
    if (/use base.+/){
	`echo "$&" >> "$cf.$ex"`
    }
    if (/.+\=\s+shift\;.*/){
	$l = $&;
	$l =~s/\$/\\\$/g;
	`echo "$l" >> "$cf.$ex"`
    }
}
